﻿using System.Collections.Generic;
using System.Diagnostics.Contracts;
using Adalbertus.BudgetPlanner.Services.CodeContracts;

namespace Adalbertus.BudgetPlanner.Services
{
    [ContractClass(typeof(IBaseServiceContract<>))]
    public interface IBaseService<TDomain>
    {
        void Save(TDomain domain);
        void Save(IEnumerable<TDomain> domains);
        void Remove(TDomain domain);

        TDomain GetById(int id);
        IEnumerable<TDomain> GetAll();
    }
}